<html>
<head>
    <title>Jquery.pager分页</title>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <script type="text/javascript" src="<!--{$smarty.const.BUILD_PATH}-->/public/JEAR/jquery/jquery.js"></script>
    <script type="text/javascript" src="<!--{$smarty.const.BUILD_PATH}-->/public/JEAR/jquery/plugins/jquery.pager.js"></script>
    <script type="text/javascript">
    $(function(){
        $.pager({
            data:{
                rowCount:$('#rowCount').val(),
                pageCount:$('#pageCount').val(),
                pageSize:$('#pageSize').val(),
                pagination:$('#pagination').val()
            },
            link:{
                protocol:$('#protocol').val(),
                protocolData:$('#protocol-data').val(),
                parameters:$('#parameters').val()
            },
            button:{
                first:[$('#first'),'link'],
                last:[$('#last'),'link'],
                next:[$('#next'),'link'],
                previous:[$('#previous'),'link'],
                cycle:[$('#cycle'),'link']
            },
            info:{
                rowCount:[$('#info_rowCount'),'25'],
                pagination:[$('#info_pagination'),'1/4']
            },
            other:{
                errorPaniel:$('#error')
            }
        });
    });
    </script>
</head>
<body>
    <!--{foreach from=$data.Rows item=item}-->
        <!--{assign var='id' value=$item.id}-->
        <a href='<!--{Route->MakeHyperlink Controller=":news::info" Parameters="id:$id"}-->'><!--{$item.title}--></a><br/>
    <!--{/foreach}-->
    <div class="fanye">
        <input id="error" type="hidden" value=""/>
        <input id="protocol" type="hidden" value="tryPHP_Common" value-other="common/tryPHP_Common/tryPHP_Static"/>
        <input id="protocol-data" type="hidden" value="<!--{Route->MakeHyperlink Controller='__SELF__'}-->"/>
        <!--优雅的分隔线-->
        <input id="rowCount" type="hidden" value="<!--{$data.Meta.RowCount}-->">
        <input id="pageSize" type="hidden" value="<!--{$data.Meta.PageSize}-->">
        <input id="pageCount" type="hidden" value="<!--{$data.Meta.PageCount}-->">
        <input id="pagination" type="hidden" value="<!--{$data.Meta.Pagination}-->">
        <input id="parameters" type="hidden" value="<!--{$data.UrlParameters|ArgumentsToString}-->">
        <!--优雅的分隔线-->
        <a id="first" href="">首页</a>
        <a id="previous" href="">上一页</a>
        <a id="cycle" style="display: none;" href="#">1</a>
        <a id="next" href="">下一页</a>
        <a id="last" href="">尾页</a>
        <span id="info_rowCount">共25条信息</span>
        <span id="info_pagination">1/4</span>
    </div>
</body>
</html>